<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductSaleDaysTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product_sale_days', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('product_id')->comment('商品id');
            $table->integer('sale_count')->comment('销售数量');
            $table->decimal('total_amount', 10 , 2)->comment('总金额');
            $table->string('date', 20)->comment('日期');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('product_sale_days');
    }
}
